#include <iostream>
#include <cstdio>

using namespace std;

int main(void)
{
	int n, T = 1;
	while(~scanf("%d", &n))
	{
		if(n < 0) break;
		int ans = 0;
		int tmp = 1;

		while(tmp < n)
		{
			ans++;
			tmp *= 2;
		}

		printf("Case %d: %d\n", T++, ans);
	}

	return 0;
}